import axios from '@/utils/request'
/**
 * 获取文章列表数据
 * @param {*} channelId 频道id
 * @param {*} timestamp 时间戳
 * @returns
 */
export const getAritcleList = (channelId, timestamp) =>
  axios({
    url: '/v1_0/articles',
    params: {
      channel_id: channelId,
      timestamp
    }
  })

/*
对文章不喜欢
*/
export const cancelLike = (target) => axios({
  method: 'POST',
  url: '/v1_0/article/dislikes',
  data: {
    target
  }
})
/* 举报文章 */
export const report = (target, type, remark) => axios({
  method: 'POST',
  url: '/v1_0/article/reports',
  data: {
    target,
    type,
    remark
  }
})
